package part19;

/**
 * @author wcj
 * @Date 2021/6/5 16:50
 * @Version 1.0
 */
public enum Part192 {

    WEST("Miss Gulch,aka the Wicked Witchof the West"),
    NORTH("Glinda,the Good Witch of the North"),
    EAST("Wicked Witch of the East"),
    SOUTH("Good by interface");

    private String description;

    private Part192(String description) {
        this.description = description;
    }

    public String getDescription() {
        return description;
    }

    /**
     * 枚举类实际上除了不能被继承，其它的特性和普通的类没有声明区别，我们可以创建构造器也可以添加字段
     * 枚举类也有其toString()方法，默认返回的是枚举的名称，我们可以覆盖此方法
     *
     * @param args
     */
    public static void main(String[] args) {
        for (Part192 value : Part192.values()) {
            System.out.println(value.getDescription());
        }
    }
}
